package com.joint.base.service;

import com.joint.base.bean.FlowEnum;
import com.joint.base.entity.TaskEntity;
import com.joint.base.entity.Users;

import java.util.List;


/**
 * Service接口 -流程任务
 * ============================================================================
 * 版权所有 2013
 * ----------------------------------------------------------------------------
 * 
 * @author 
 * 
 * @version 0.1 2013-05-09
 */

public interface TaskEntityService extends BaseEntityService<TaskEntity, String> {

    public List<TaskEntity> getInfoByEntityName(String entityName);

    public TaskEntity getInfoByKeyId(String keyId);

    /**
     * 根据当前用户的阅读权限查数据
     * @param entityName
     * @param processState
     * @param users_id
     * @return
     */
    public List<TaskEntity> getInfoByReaders(String entityName, FlowEnum.ProcessState[] processState, String users_id);

    /**
     * 获得当前用户的草稿
     * @return
     */
    public List<TaskEntity> getInfoByDraft(FlowEnum.ProcessState processState, Users users);

    /**
     * 根据当前用户的编辑权限查数据
     * @param processState
     * @param users_id
     * @return
     */
    public List<TaskEntity> getInfoByEditors(FlowEnum.ProcessState[] processState, String users_id);

}